#include<iostream>
using namespace std;

int main(){
	int a[9],max = 0,min = 100,sum = 0;
	for(int i = 0;i < 9;i++){
		cin>>a[i];
		if(max<a[i]){
			max = a[i];
		}
		if(min > a[i]){
			min = a[i];
		}
		sum += a[i];
	}
	sum = sum - max - min;
	cout<<sum*1.0/7<<endl;
	return 0;
}
